import request from '@/utils/request'

export function listPerson(query) {
  return request({
    url: '/data/person/list',
    method: 'get',
    params: query
  })
}

export function createPerson(data) {
  return request({
    url: '/data/person/create',
    method: 'post',
    data
  })
}

export function readPerson(data) {
  return request({
    url: '/data/person/read/' + data.id,
    method: 'get'
  })
}

export function updatePerson(data) {
  return request({
    url: '/data/person/update',
    method: 'post',
    data
  })
}

export function deletePerson(data) {
  return request({
    url: '/data/person/delete/' + data.fuserno,
    method: 'delete'
  })
}

export function personOptions(query) {
  return request({
    url: '/data/person/options',
    method: 'get',
    params: query
  })
}
